from db.mysql.MySql import MySql

#基类
from framework.EException import EException


class BaseService(object):
    def __init__(self,mySql):
        self.mySql=mySql;

    def checkJsonKey(self,json, *keys):
        if (len(keys)==0):
            raise EException(501,"参数错误");
        for key in keys:
            if (json[key]==None):
                raise EException(501,"请求参数不完整【{0}】" % key);